@weuiDialogBackgroundColor: #FAFAFC;
@weuiDialogLineColor: #D5D5D6;
@weuiDialogLinkColor: #3CC51F;
@weuiDialogLinkActiveBc: #EEEEEE;
@dialog-button-text-primary-color: #0BB20C;
@dialog-button-text-default-color: #353535;

.weui_dialog {
  position: fixed;
  z-index: 5000;
  width: 85%;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);

  background-color: @weuiDialogBackgroundColor;
  text-align: center;
  border-radius: 3px;
  overflow: hidden;
  .weui_dialog_confirm & {
    .weui_dialog_hd {
      padding: 1.2em 20px .5em;
    }
    .weui_dialog_bd {
      text-align: left;
    }
  }
}

.weui_dialog_hd {
  padding: 1.2em 0 .5em;
}

.weui_dialog_title {
  font-weight: 400;
  font-size: 17px;
}

.weui_dialog_bd {
  padding: 0 20px;
  font-size: 15px;
  color: #333;
  word-wrap: break-word;
  word-break: break-all;
}

.weui_dialog_ft {
  position: relative;
  line-height: 42px;
  margin-top: 20px;
  font-size: 17px;
  display: flex;
  a {
    display: block;
    flex: 1;
    color: @weuiDialogLinkColor;
    text-decoration: none;
    &:active {
      background-color: @weuiDialogLinkActiveBc;
    }
  }
  &:after {
    content: " ";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 1px;
    border-top: 1px solid @weuiDialogLineColor;
    color: @weuiDialogLineColor;
    transform-origin: 0 0;
    transform: scaleY(0.5);
  }
  .weui_dialog_confirm & {
    a {
      position: relative;
      &:after {
        content: " ";
        position: absolute;
        left: 0;
        top: 0;
        width: 1px;
        height: 100%;
        border-left: 1px solid @weuiDialogLineColor;
        color: @weuiDialogLineColor;
        transform-origin: 0 0;
        transform: scaleX(0.5);
      }
      &:first-child {
        &:after {
          display: none;
        }
      }
    }
  }
}

.weui_btn_dialog {
  &.default {
    color: @dialog-button-text-default-color;
  }
  &.primary {
    color: @dialog-button-text-primary-color;
  }
}

@media screen and (min-width: 1024px) {
  .weui_dialog {
    width: 320px;
  }
}
